package com.joplus.housekeeper.ui.view;

import android.content.Context;
import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.joplus.housekeeper.R;

/**
 * Created by Administrator on 2016/6/26.
 */
public class InsetDecoration extends RecyclerView.ItemDecoration {
    private int mInsets;

    public InsetDecoration(Context context) {
        mInsets =context.getResources().getDimensionPixelOffset(R.dimen.x16);
    }
    @Override
    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
        outRect.set(mInsets, mInsets, mInsets, mInsets);
    }

}
